package com.im.service.common.smo;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.im.service.dto.BusiConstParam;
import com.im.service.dto.CodeSeq;
import com.im.service.dto.PageQuery;
import com.im.service.dto.TabColParam;

import net.sf.json.JSONObject;

public interface ICommonSMO {
	/**
	 * 缓存中设置
	 */
	public void putValueToRedis(String key,Object value,Long effTime);

	/**
	 * 缓存中获取
	 */
	public Object getValueFromRedis(String key);
	/**
	 * 
	 * @param param
	 * @return
	 * @throws Exception
	 */
	public List<TabColParam> queryTabColParam(Map<String, Object> param) throws Exception;

	/**
	 * 查询常量
	 * @param jsonObject
	 * @return
	 */
	public PageQuery<BusiConstParam> queryBusiConstByCond(JSONObject jsonObject);

	/**
	 * 查询常量值
	 * @param jsonObject
	 * @return
	 */
	public List<?> queryBusiConstValByCond(JSONObject jsonObject);

	/**
	 * 保存及更新常量、常量值
	 * @param jsonObject
	 */
	public void saveOrUpdateBusiConst(JSONObject jsonObject);
	/**
	 * 保存及更新文件模板
	 * @param jsonObject
	 */
	public void saveOrUpdateFileTemp(JSONObject jsonObject);
	/**
	 * 获取序列
	 * @throws Exception 
	 */
	public String querySeq(String tableName) throws Exception;
	public String querySeqForRule(String seqType,String pCode) throws Exception;

	public void updateCodeSeq(CodeSeq codeSeq) throws Exception;

	/**
	 * 数据导出
	 * 
	 * @param request
	 * @param response
	 * @throws Exception
	 */
	public void getExportExcel(HttpServletRequest request, HttpServletResponse response) throws Exception;
	/**
	 * 数据导出
	 *
	 * @param request
	 * @param response
	 * @throws Exception
	 */
	public String saveOrUpdateExcel(HttpServletRequest request, HttpServletResponse response) throws Exception;
}
